<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0,
		minimum-scale=1.0, maximum-scale=1.0"/>
    <meta charset="UTF-8">
    <title>发票</title>
    <link href="../public/css/style.css" rel="stylesheet">
    <link href="../public/css/common.css" rel="stylesheet">
    <script src="../public/js/jquery.js"></script>
</head>
<body class="layout_body">
<div class="layout_content graybg">
    <header class="demo-header" style="padding-top: 10px;">
        <div class="titleLeft flt">
            <a href="index.html">
                <img src="../public/img/back.png" width="35px" height="33px">
            </a>
        </div>
        <div class="titleRight flt text-center">发票</div>
    </header>
    <?php if ($invoiceDate){ ?>
        <?php foreach ($invoiceDate['list'] as $key => $invoince){ ?>
            <div class="whitebg" onclick="detail(<?php echo $invoince['id'];?>)">
                <div class="sizecolor flt">申请编号：<?php echo '100'.$invoince['id']; ?></div><div class="frt zonge" style=""><?php echo $invoince['status']?></div>
                <div class="clear_both"></div>
                <div class="message-detail">
                    <p>开票类型：<?php echo $invoince['receipt_type']?></p>
                    <p>发票金额：￥<?php echo $invoince['price']?></p>
                    <?php if ($invoince['receipt_type'] !== '个人'){ ?>
                        <p>发票抬头：<?php echo $invoince['title']?></p>
                    <?php } ?>
                    <p>开票时间：<?php echo $invoince['create_time']?></p>
                </div>
            </div>
        <?php } ?>
    <?php } ?>
    <div class="whitebg">
        <div class="padding-adjust4">
            <a href="/invoice/add">
                <div class="button-two Cgray">新增发票</div>
            </a>
        </div>
    </div>
</div>
<script>
    function detail(invoice_id) {
        window.location.href ='/invoice/detail?invoice_id='+invoice_id;
    }
</script>
</body>
</html>
